package com.alisls.shequtao.common.model.query;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 分页查询参数
 *
 * @author Ke Wang
 */
@Getter
@Setter
@ToString
public class PageQuery implements Serializable {

    /**
     * 默认起始页
     */
    private final Integer START_PAGE = 1;

    /**
     * 默认每页大小
     */
    private final Integer PAGE_SIZE = 10;

    /**
     * 排序方式：升序
     */
    private final String ORDER_TYPE_ASC = "asc";

    /**
     * 排序方式：降序
     */
    private final String ORDER_TYPE_DESC = "desc";

    /**
     * 页码，默认为1
     */
    private Integer currentPage = START_PAGE;

    /**
     * 每页记录数，默认为10
     */
    private Integer pageSize = PAGE_SIZE;

    /**
     * 排序字段
     */
    private String orderField;

    /**
     * 排序方式
     */
    private String orderType;

    /**
     * 是否升序
     */
    private Boolean isAsc = Boolean.TRUE;

}
